$m(function(args) {
    //获取详情页面头部信息
    var datas = args.data;
    var ctype = datas.FLOWSTATUS;
    var creattime = DateUtils.formatDate(datas.CREAT_TIME, 'yyyy-MM-dd hh:mm:ss');
    var creator = datas.USER_NAME;
    if(creator.length>6){
        creator = creator.substr(0,7)+"...";
    }
    $("#ca-name").text(datas.GRAYNAME);
    $("#ca-name").attr('title', datas.GRAYNAME);
    $("#task-creator").text(creator);
    $("#task-creator").attr("title",datas.USER_NAME);
    $("#belong_workspace").text(datas.WORKSPACENAME);
    $("#belong_theme").text(datas.APPLICATION);
    $("#task-createTime").html(creattime);
    $('.rs-right-top span[id="belong_workspace"]').attr("title",datas.WORKSPACENAME);
    $('#ca-name').attr("title",datas.SERVENAME);
    $(".task-runtStatus").attr("id",datas.SERVICEID);

    if(ctype == '1' || ctype == '0'){
        $(".tempo-label-task-runtStatus").html("服务状态 : ");
        if(ctype == "1"){
            $(".task-runtStatus").html("启用");
        }else if(ctype == "0"){
            $(".task-runtStatus").html("禁用");
        }
    };
    $m.loadPage(contextPath + "/api/ai/app/view/grayconfiguration"+"?id="+datas.GRAYID+"&&flag="+true+"&&t="+TempoUtils.uuid(), $(".task-right-bot-container"));
    $("#taskconfiguration").css("border-bottom","2px solid #1F73B6");
    $("#taskconfiguration").click(function () {
        $(".tempo-head-li").css("border-bottom","");
        $(this).css("border-bottom","2px solid #1F73B6");
        $(".task-right-bot-container").empty();
        $m.loadPage(contextPath + "/api/ai/app/view/grayconfiguration"+"?id="+datas.GRAYID+"&&flag="+true+"&&t="+TempoUtils.uuid(), $(".task-right-bot-container"));
    });
    $("#taskmonitor").click(function () {
        $(".tempo-head-li").css("border-bottom","");
        $(this).css("border-bottom","2px solid #1F73B6");
        $(".task-right-bot-container").empty();
        $m.loadPage(contextPath + "/api/ai/app/view/graymonitor?id="+datas.GRAYID+"&&t="+TempoUtils.uuid(), $(".task-right-bot-container"));
    });
    $("#taskaudit").click(function () {
        $(".tempo-head-li").css("border-bottom","");
        $(this).css("border-bottom","2px solid #1F73B6");
        $(".task-right-bot-container").empty();
        $m.loadPage(contextPath + "/api/ai/app/view/audit?id="+datas.GRAYID+"&&t="+TempoUtils.uuid(), $(".task-right-bot-container"));
    });

})